<%-- 
    Document   : userAdmin
    Created on : Dec 4, 2010, 11:38:55 AM
    Author     : edwinelpaisa
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!doctype html>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>::Admin. Usuarios::</title>
        <link href="../styles/userAdmin.css" rel="stylesheet" type="text/css">        
        <link rel="stylesheet" type="text/css" href="../js/jquery/fancybox/fancybox/jquery.fancybox-1.3.1.css"/>
        <link href="../styles/register.css" rel="stylesheet" type="text/css" />
        <link href="../js/jquery/alerts/jquery.alerts.css" rel="stylesheet" type="text/css" />

        <script src="../js/jquery/jquery-1.4.2.js" type="text/javascript"></script>        
        <script type="text/javascript" src="../js/jquery/fancybox/fancybox/jquery-1.4.2.min.js"></script>
        <script type="text/javascript" src="../js/jquery/fancybox/fancybox/jquery.mousewheel-3.0.2.pack.js"></script>
        <script type="text/javascript" src="../js/jquery/fancybox/fancybox/jquery.fancybox-1.3.1.js"></script>
        <script type="text/javascript" src="../js/jquery/alerts/jquery.alerts.js"></script>

        <script type="text/javascript" language="javascript" src="../js/md5.js"></script>
        <script type="text/javascript" language="javascript" src="../js/validations.js"></script>
        <script type="text/javascript" language="javascript" src="../js/ajax.js"></script>
        <script type="text/javascript" language="javascript" src="../js/register.js"></script>

        <script type="text/javascript" language="javascript">
            $(document).ready(function(){
                $("#popup1").fancybox({
                    'width':560,
                    'height':340,
                    'hideOnContentClick': false,
                    'overlayOpacity': 0.5
                });
                $("#popup2").fancybox({
                    'width':560,
                    'height':340,
                    'hideOnContentClick': false,
                    'overlayOpacity': 0.5
                });
            });
            window.onload = loadUsers();
        </script>
    </head>
    <body>        
        <div id="options">            
            <ul>
                <a id="popup1" href="register.jsp"><li id="add"></li></a>
                <a id="popup2" href="#formUpdate" onclick="loadUpdate();"><li id="update"></li></a>
                <a href="#" onclick="deleteUser();"><li id="delete"></li></a>
            </ul>            
        </div>
        <div id="divSearch">
            <label>Buscar:</label>&nbsp;&nbsp;&nbsp;
            <input type="text" placeholder="Nombre de Usuario" onkeypress="return letrasYNumeros(event)"/>
        </div>
        <center>
            <div id="dataUsers">

            </div>
        </center>
        <div id="maskForm" style="display: none;">
            <div id="formUpdate">
                <br>
                <center>
                <table class="text" onkeypress="if(event.keyCode==13){btnUpdate_onclick();}">
                    <tr>
                        <td>Identificaci&oacute;n:</td> <td><input type="number" id="txtId1" min="0" max="1057999999" placeholder="123456" /></td>
                    </tr>
                    <tr>
                        <td>Correo-e:</td> <td><input type="email" id="txtMail1" placeholder="ejemplo@travelmap.com" onkeypress="return validarEmail(event)"/></td>
                    </tr>
                    <tr>
                        <td>Nombre:</td> <td><input type="text" id="txtName1" placeholder="Nombre" onkeypress="return validaNombYApe(event)"/></td>
                    </tr>
                    <tr>
                        <td>Nombre de Usuario:</td> <td><input type="text" id="txtUName1" disabled="disabled" placeholder="Nombre de Usuario" onkeypress="return letrasYNumeros(event)"/></td>
                    </tr>
                    <tr>
                        <td>Telefono:</td> <td><input type="number" id="txtTelephone1" min="1000000" max="3229999999" placeholder="123456"/></td>
                    </tr>
                    <tr>
                        <td>Nueva Password:</td> <td><input type="password" placeholder="******" id="txtPassword3" /></td>
                    </tr>
                    <tr>
                        <td>Repetir Nueva Password:</td> <td><input type="password" placeholder="******" id="txtPassword4" /></td>
                    </tr>
                    <tr>
                        <td>Tipo de Usuario:</td> <td><select id="userType1">
                                <option value="0">Cliente</option>
                                <option value="1">Empleado</option>
                                <option value="2">Administrador</option>
                                </select></td>
                    </tr>
                    <tr>
                        <td align="center" colspan="2"><input type="button" id="btnUpdate" value="Actualizar" onclick="btnUpdate_onclick();"/></td>
                    </tr>
                    <tr>
                        <td align="center" colspan="2"><input type="button" id="btnCancel" value="Cancelar" onclick="parent.$.fancybox.close();"/></td>
                    </tr>
                </table>
        </center>
            </div>
        </div>
    </body>
</html>
